use opencv::{highgui, Result};

use bwexam_lib::image::test_template_match;

// cargo run --example testcv
// https://github.com/twistedfall/opencv-rust/tree/master/examples
fn main() -> Result<()> {
    // 测试配置在.cargo/config.toml 中的环境变量
    println!(
        "config.toml env OPENCV_LINK_PATHS: {}",
        env!("OPENCV_LINK_PATHS")
    );
    // let image = imgcodecs::imread("D:/2.jpg", imgcodecs::IMREAD_GRAYSCALE)?;
    // highgui::named_window("hello opencv!", 0)?;
    // highgui::imshow("hello opencv!", &image)?;
    test_template_match("a.jpg", "b.jpg", true)?;
    // 等待5s 退出
    highgui::wait_key(5000)?;
    Ok(())
}
